package com.codeOfDoom.Sets.SetsCard.SetCardHelpers
{
	import mx.collections.ArrayCollection;
	//type safe enum
	public class CardColor
	{
		private var _name:String;
		private static var _created:Boolean= false;
		//static block of code. created when the class is loaded into memory. 
		{
			_created = true;
		}
		public function CardColor(name:String){
			if (_created)
				throw new Error(name + " already created");
			_name = name;
		}
		public function toString():String{
			return _name;
		}
		public static const RED:CardColor = new CardColor("red");
		public static const GREEN:CardColor = new CardColor("green");
		public static const PURPLE:CardColor= new CardColor("purple");
		public static const COLORS:Array = [RED,GREEN,PURPLE];
	}
}

